const Layout = () => import("@/layout/index.vue");

export default {
  path: "/system",
  name: "System",
  component: Layout,
  redirect: "/system/user/index",
  meta: {
    icon: "ri:settings-3-line",
    title: "系统管理",
    rank: 20
  },
  children: [
    {
      path: "/system/user/index",
      name: "SystemUser",
      component: () => import("@/views/system/user/index.vue"),
      meta: {
        title: "用户管理",
        roles: ["admin"]
      }
    },
    {
      path: "/system/role/index",
      name: "SystemRole",
      component: () => import("@/views/system/role/index.vue"),
      meta: {
        title: "角色管理",
        roles: ["admin"]
      }
    },
    {
      path: "/system/announcement/index",
      name: "SystemAnnouncement",
      component: () => import("@/views/system/announcement/index.vue"),
      meta: {
        title: "公告管理",
        roles: ["admin"]
      }
    },
    {
      path: "/system/menu/index",
      name: "SystemMenu",
      component: () => import("@/views/system/menu/index.vue"),
      meta: {
        title: "菜单管理",
        roles: ["admin"]
      }
    },
    {
      path: "/system/ranking/index",
      name: "SystemRanking",
      component: () => import("@/views/system/ranking/index.vue"),
      meta: {
        title: "排行榜管理",
        roles: ["admin"]
      }
    },

    {
      path: "/system/user/profile/:id",
      name: "SystemUserProfile",
      component: () => import("@/views/system/user/profile/index.vue"),
      meta: {
        title: "用户详情",
        roles: ["admin"],
        showLink: false
      }
    }
  ]
} satisfies RouteConfigsTable;
